<form class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-4 control-label" for="payment_type">账号类型</label>
        <div class="col-sm-8">
            <select class="form-control" name="payment_type" id="payment_type" v-model="payment_type">
                <option value="alipay">国内支付宝</option>
                <option value="global_alipay">国际支付宝</option>
                <option value="wxpay">国内微信支付</option>
                <option value="global_wxpay">国际微信支付</option>
            </select>
        </div>
    </div>
    <template v-if="(payment_type=='alipay'  || payment_type == 'global_alipay')">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-4 control-label">接口类型</label>
            <div class="col-sm-8">
                <div class="radio">
                    <label v-if="payment_type != 'global_alipay'">
                        <input type="radio" name="key_type" value="openapp" aria-label="..." v-model="key_type"> 开放平台
                    </label>
                    <label>
                        <input type="radio" name="key_type" value="partner" aria-label="..." v-model="key_type"> mapi网关
                    </label>
                    <label v-if="payment_type != 'global_alipay'">
                        <input type="radio" name="key_type" value="wireless" aria-label="..." v-model="key_type"> 老版WAP支付
                    </label>
                </div>
            </div>
        </div>
    </template>
    <div class="form-group">
        <label class="col-sm-4 control-label">加密类型</label>
        <div class="col-sm-8">
            <div class="radio">
                <template v-if="payment_type=='wxpay' || payment_type=='global_wxpay'">
                    <label>
                        <input type="radio" name="sign_type" value="md5" aria-label="..." v-model="sign_type"> MD5
                    </label>
                    <label>
                        <input type="radio" name="sign_type" value="hmac-sha256" aria-label="..." v-model="sign_type"> HMAC-SHA256
                    </label>
                </template>
                <template v-else-if="payment_type=='alipay' || payment_type == 'global_alipay'">
                    <template  v-if="key_type == 'partner' || key_type == 'wireless'">
                        <label>
                            <input type="radio" name="sign_type" value="md5" aria-label="..." v-model="sign_type"> MD5
                        </label>
                        <label>
                            <input type="radio" name="sign_type" value="dsa" aria-label="..." v-model="sign_type"> DSA密钥
                        </label>
                    </template>
                    <template v-else-if="key_type == 'openapp' && payment_type != 'global_alipay'">
                        <label>
                            <input type="radio" name="sign_type" value="RSA2" aria-label="..." v-model="sign_type"> RSA2(SHA256)密钥
                        </label>
                        <label>
                            <input type="radio" name="sign_type" value="aes" aria-label="..." v-model="sign_type"> AES密钥
                        </label>
                    </template>

                    <label>
                        <input type="radio" name="sign_type" value="RSA" aria-label="..." v-model="sign_type"> RSA(SHA1)密钥
                    </label>
                </template>
            </div>
        </div>
    </div>
    <!--如果是支付宝国内支付并且使用的是蚂蚁金服开放平台-->
    <template v-if="(payment_type == 'alipay' && key_type == 'openapp')">
        <div class="form-group">
            <label for="app_id" class="col-sm-4 control-label">APPID</label>
            <div class="col-sm-8">
                <input type="text" maxlength="50" class="form-control" id="app_id" placeholder="APPID" v-model="app_id">
            </div>
        </div>
    </template>
    <!--如果是支付宝且不是开放平台-->
    <template v-if="(payment_type == 'alipay' || payment_type == 'global_alipay') && key_type != 'openapp'">
        <div class="form-group">
            <label for="app_id" class="col-sm-4 control-label">合作伙伴身份（PID）</label>
            <div class="col-sm-8">
                <input type="text" maxlength="50" class="form-control" id="partner" placeholder="合作伙伴身份（PID）" v-model="partner">
            </div>
        </div>
    </template>
    <!--如果是微信支付-->
    <template v-if="payment_type == 'wxpay' || payment_type == 'global_wxpay'">
        <div class="form-group">
            <label for="app_id" class="col-sm-4 control-label">公众账号ID</label>
            <div class="col-sm-8">
                <input type="text" maxlength="50" class="form-control" name="app_id" id="app_id" placeholder="APPID" v-model="app_id">
            </div>
        </div>
        <div class="form-group">
            <label for="app_id" class="col-sm-4 control-label">商户号</label>
            <div class="col-sm-8">
                <input type="text" maxlength="50" class="form-control" name="app_id" id="mch_id" placeholder="商户号" v-model="mch_id">
            </div>
        </div>
    </template>

    <template v-if="sign_type=='md5'">

    </template>

    <div class="form-group">
        <label for="inputPassword3" class="col-sm-4 control-label">Password</label>
        <div class="col-sm-8">
            <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
            <button type="submit" class="btn btn-success" data-loading-text="保存中...">确定提交</button>
        </div>
    </div>
</form>